#!/bin/bash

buildRoot=/build
installDstRoot=/usr/local

srcRoot=$buildRoot/src
buildTmpRoot=$buildRoot/tmp
pkgRoot=$buildRoot/pkg
scriptRoot=$buildRoot/script

$scriptRoot/pre_build.sh

mkdir -p $buildTmpRoot
cd $buildTmpRoot

tar zxvf $srcRoot/memcached-1.4.25.tar.gz
cd memcached-1.4.25
./configure --prefix=$installDstRoot/memcached-1.4.25
make
make install

cd $installDstRoot
tar zcvf memcached-1.4.25.tar.gz memcached-1.4.25
cp memcached-1.4.25.tar.gz $pkgRoot
